use std::time::Duration;
use ash::vk::{self, Handle};
use getset::{CloneGetters, CopyGetters, Getters, MutGetters, Setters, WithSetters};

use crate::engine::{njm_camera::NjmCamera, njm_game_obj::{self, NjmGameObj}};



const MAX_LIGHT_COUNT: usize = 10;

#[repr(C)]
pub struct PointLight {
    pub position: cgmath::Vector4<f32>,
    pub color: cgmath::Vector4<f32>,
}

#[repr(C)]
pub struct GlobalUbo {
    pub projection: cgmath::Matrix4<f32>,
    pub view: cgmath::Matrix4<f32>,
    pub inverse_view: cgmath::Matrix4<f32>,
    pub ambient_light_color: cgmath::Vector4<f32>,
    // pub point_lights: [PointLight; MAX_LIGHT_COUNT],
    // pub num_lights: u32,
}

pub struct FrameInfo<'a> {
    pub frame_index: usize,
    pub frame_time: Duration,
    pub cmd_buf: vk::CommandBuffer,
    pub camera: &'a NjmCamera,
    pub desc_set: vk::DescriptorSet,
    pub objs: &'a njm_game_obj::Map,
}